/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 * @autor Steph
 */
package ObjetData;

import DAO.DaoLiensPhotos;

/**
 *
 * @author Steph
 */
public class LiensPhotos {

    private Integer idLien;
    private Integer idAnimal;
    private String lien;

    public LiensPhotos() {
    }

    public Integer getIdLien() {
        return idLien;
    }

    public void setIdLien(Integer idLien) {
        this.idLien = idLien;
    }

    public Integer getIdAnimal() {
        return idAnimal;
    }

    public void setIdAnimal(Integer idAnimal) {
        this.idAnimal = idAnimal;
    }

    public String getLien() {
        return lien;
    }

    public void setLien(String lien) {
        this.lien = lien;
    }

    public LiensPhotos(Integer idLien) {
        this.idLien = idLien;
        DaoLiensPhotos dao = new DaoLiensPhotos();
        LiensPhotos l = dao.find(idLien);
        if (l != null) {
            this.idAnimal = l.getIdAnimal();
            this.idLien = l.getIdLien();
        }
    }
}
